package com.adan.content.model.dto;

import com.adan.base.valid.ValidationGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 保存课程计划 dto，包括新增、修改
 * @date: 2023-06-05 9:14
 */
@Data
@ApiModel(value = "SaveTeachplanDto", description = "新增/修改课程计划")
public class SaveTeachplanDto {
    /**
     * 教学计划id
     */
    @NotNull(groups = {ValidationGroups.Update.class}, message = "修改必须指定课程计划id")
    @Null(groups = {ValidationGroups.Insert.class}, message = "新增不能指定课程计划id")
    @ApiModelProperty(value = "课程计划id")
    private Long id;
    /**
     * 课程计划名称
     */
    @NotBlank(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    @ApiModelProperty(value = "课程计划名称", required = true)
    private String pname;
    /**
     * 课程计划父级Id
     */
    @NotBlank(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    @ApiModelProperty(value = "课程计划父级Id", required = true)
    private Long parentid;
    /**
     * 层级，分为1、2、3级
     */
    @NotBlank(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    @ApiModelProperty(value = "课程计划层级", required = true)
    private Integer grade;
    /**
     * 课程类型:1视频、2文档
     */
    @ApiModelProperty(value = "课程类型:1视频、2文档")
    private String mediaType;
    /**
     * 课程标识
     */
    @NotBlank(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    @ApiModelProperty(value = "课程Id", required = true)
    private Long courseId;
    /**
     * 课程发布标识
     */
    @ApiModelProperty(value = "课程发布标识")
    private Long coursePubId;
    /**
     * 是否支持试学或预览（试看）
     */
    @ApiModelProperty(value = "是否支持试学或预览（试看）")
    private String isPreview;
}
